/PROG  PNS0028
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "VE21_2473_2474";
PROG_SIZE	= 3362;
CREATE		= DATE 23-11-23  TIME 14:03:46;
MODIFIED	= DATE 24-11-08  TIME 11:41:56;
FILE_NAME	= PNS0042;
VERSION		= 0;
LINE_COUNT	= 121;
MEMORY_SIZE	= 3814;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R34 ;
   6:  !  PROGRAM: PNS0042 ;
   7:  !  PART:53332389/90  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  R[5:SPEED           ]=10    ;
  24:  OVERRIDE=R[5:SPEED           ] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:   ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED           ] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  R[5:SPEED           ]=100    ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5:SPEED           ] ;
  56:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  57:   ;
  58:J P[4:PICK] 100% CNT5 TB R[18]sec,CALL PARTPICK ACC100    ;
  59:  PAYLOAD[2] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT5 ACC100 TA R[20]sec,DO[5:TO R23 DROP START]=PULSE,1.0sec    ;
  63:  DO[8:P3 PARTS OUT]=PULSE,1.0sec ;
  64:  LBL[27] ;
  65:  CALL CHECKPICK    ;
  66:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  67:   ;
  68:   ;
  69:   ;
  70:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  71:   ;
  72:  LBL[30:GOTO DROP POUNCE] ;
  73:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  74:   ;
  75:  TIMER[3]=STOP ;
  76:  LBL[40:AT DROP POUNCE] ;
  77:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  78:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  79:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  80:  JMP LBL[40] ;
  81:   ;
  82:  LBL[50:MOVE DROP SNEAK] ;
  83:  TIMER[3]=START ;
  84:  OVERRIDE=R[5:SPEED           ] ;
  85:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  86:  LBL[51:DROP OR C-P-S] ;
  87:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  88:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  89:  JMP LBL[51] ;
  90:  JMP LBL[50] ;
  91:   ;
  92:  LBL[60:MOVE CLS-PRS-ACC] ;
  93:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  94:  PAUSE ;
  95:  JMP LBL[30] ;
  96:   ;
  97:  LBL[80:DROP ENABLED] ;
  98:  TIMER[3]=START ;
  99:  !PROCEED TO DROP ;
 100:  OVERRIDE=R[5:SPEED           ] ;
 101:J P[10:DROP APPROACH] 100% CNT40 ACC100    ;
 102:  MONITOR END Z_CHECH ;
 103:J P[11:DROP] 100% CNT15 TB R[19]sec,CALL PARTDROP ACC120    ;
 104:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 105:  PAYLOAD[1] ;
 106:  CALL CHK_DROP    ;
 107:J P[12:DROP DEPART] 100% CNT100 ACC150 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 108:  //DO[7:PRESS STAMPING START]=PULSE,1.0sec ;
 109:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 110:  !GOTO PICK POUNCE ;
 111:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 112:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 113:  JMP LBL[10] ;
 114:   ;
 115:  LBL[90:END OF CYCLE] ;
 116:  TIMER[1]=STOP ;
 117:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 118:J P[1:MIDDLE] 50% CNT100    ;
 119:  MOVE TO HOME    ;
 120:   ;
 121:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -830.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.383  mm,	Y =  1567.000  mm,	Z = -1040.320  mm,
	W =   179.322 deg,	P =     1.370 deg,	R =   150.802 deg,
	E1=   130.627 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2629.947  mm,	Y =  3264.270  mm,	Z = -1119.594  mm,
	W =  -178.556 deg,	P =    -1.301 deg,	R =    90.082 deg,
	E1=   195.796 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2629.947  mm,	Y =  3264.269  mm,	Z = -1267.193  mm,
	W =  -178.556 deg,	P =    -1.301 deg,	R =    90.082 deg,
	E1=   195.796 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2629.947  mm,	Y =  3264.269  mm,	Z = -1031.194  mm,
	W =  -178.556 deg,	P =    -1.301 deg,	R =    90.082 deg,
	E1=   195.796 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2141.280  mm,	Y =  1341.783  mm,	Z = -1011.255  mm,
	W =   179.137 deg,	P =     3.176 deg,	R =   148.447 deg,
	E1=   136.564 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2048.563  mm,	Y =  -955.604  mm,	Z =  -940.000  mm,
	W =  -178.096 deg,	P =     1.000 deg,	R =  -157.691 deg,
	E1=    82.388 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2445.106  mm,	Y = -2439.099  mm,	Z =  -968.106  mm,
	W =  -177.987 deg,	P =     -.817 deg,	R =  -106.929 deg,
	E1=    33.768 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2666.171  mm,	Y = -3245.968  mm,	Z = -1070.885  mm,
	W =  -178.955 deg,	P =    -1.343 deg,	R =   -91.155 deg,
	E1=    16.812 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2666.288  mm,	Y = -3246.339  mm,	Z = -1243.546  mm,
	W =  -178.957 deg,	P =    -1.344 deg,	R =   -91.128 deg,
	E1=    16.788 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2666.288  mm,	Y = -3246.339  mm,	Z = -1204.505  mm,
	W =  -178.957 deg,	P =    -1.344 deg,	R =   -91.128 deg,
	E1=    16.788 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2177.738  mm,	Y = -1158.742  mm,	Z = -1108.117  mm,
	W =  -177.659 deg,	P =      .427 deg,	R =  -150.718 deg,
	E1=    74.165 deg
};
/END
